import request from '@/utils/request'

// const apiurl = `http://localhost:3000`
const apiurl = `https://webdeploy.bepicgamescn.com`
// let apiurl = `https://cdn.rfcode.top/api`

export function getTaskLogs(params) {
  return request({
    url: '/TaskLogs/showData',
    method: 'get',
    params,
    baseURL: apiurl

  })
}

export function cancelTask(data) {
  return request({
    url: '/TaskLogs/cancelTask',
    method: 'post',
    data,
    baseURL: apiurl

  })
}

export function getDomainList(params) {
  return request({
    url: '/HostConfigs/showDomains',
    method: 'get',
    params,
    baseURL: apiurl
  })
}

export function addOrRemoveDomain(data) {
  return request({
    url: '/HostConfigs/addOrRemoveDomain',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    },
    baseURL: apiurl
  })
}

export function getDomainConfig(data) {
  return request({
    url: '/HostConfigs/getDomainConfig',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    },
    baseURL: apiurl
  })
}

export function setAdDeployment(data) {
  return request({
    url: '/hostConfigsOps/setAdDeployment',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    },
    baseURL: apiurl
  })
}
